var hideWindows = function( wins, index ){
	Ext.getCmp( wins ).hide();
};

doSwitchDirection = function ( dir ){
	Ext.each( ['div','img'] ,  function(arEle) {
		Ext.each( Ext.query( ''+ arEle + '' ), function( ele, index  ){
			ele.dir = dir;
		});
	});
};
reloadPage=function(page){
	document.location = page;
	if(page.contains('ar')){
	//locale = 'ar';
doSwitchDirection('rtl');
	}
	else{
locale = 'en';
doSwitchDirection('ltr');
	}
window.onload= self.document.location.reload();

}